package com.study.javaguide.thread;

import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;

/**
 * @author study
 * @version 1.0
 * @date 2020/8/8 21:22
 */
public class MyCallable implements Callable<String> {
    @Override
    public String call() throws Exception {
        TimeUnit.SECONDS.sleep(1);
        //返回当前 Callable 的线程名字
        return Thread.currentThread().getName();
    }
}
